package com.hpin.fansea.sale;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.hpin.fansea.R;
import com.hpin.fansea.base.BaseActivity;

/**
 * 商品图文详情页面
 * Created by Aaron on 15/10/22.
 */
public class PurchaseDescribeActivity extends BaseActivity {

    private WebView purchase_wv_description;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_goods_describe);

        initWidget();

    }

    private void initWidget() {

        // 返回按钮
        ImageView iv_left = (ImageView) findViewById(R.id.iv_left);

        iv_left.setOnClickListener(this);

        TextView tv_title = (TextView) findViewById(R.id.tv_title);
        tv_title.setText("图文详情");

        // 设置webview
        purchase_wv_description = (WebView) findViewById(R.id.purchase_wv_description);

        purchase_wv_description.loadDataWithBaseURL(null,
               getIntent().getStringExtra("describe"), "text/html", "utf-8", null);

    }

    @Override
    public void widgetClick(View v) {

        switch (v.getId()){
            case R.id.iv_left:
                finish();
                break;

        }

    }
}
